<?php
class DemoController extends Yaf_Controller_Abstract {

   	public function init(){
         if(is_null(Yaf_Session::getInstance()->get(AK47))){
            $this->redirect('/index.php/admin/login/login');
         }
         if ($this->getRequest()->isXmlHttpRequest()) {
            Yaf_Dispatcher::getInstance()->disableView();
         }
   		$this->setViewPath(APP_PATH . '/application/modules/Admin/views');
         $this->getView()->assign('ad_li_active',"class='active'");
         $this->getView()->assign('content_nav',array(
               array('name'=>'Demo说明','href'=>'/index.php/admin/demo/index'),
               array('name'=>'关于Demo','href'=>'/index.php/admin/demo/add'),
            ));
         $data = array(
               'right_title'=>'Demo',
               "title"  => '惠信后台管理',
            );
         $this->getView()->assign($data);
   	}

      /**
       * 广告列表
       * @return [type] [description]
       */
      public function indexAction(){
         $data = array(
            'active' => 0,

         );
         $this->getView()->assign($data);
      }

      public function addAction(){
         $data = array(
            'active' => 1,

         );
         $this->getView()->assign($data);
      }
}

?>